package com.icart.entities;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

public class WoCommentitemEntityPK implements Serializable {
    private long commid;
    private int itemid;

    @Column(name = "commid")
    @Id
    public long getCommid() {
        return commid;
    }

    public void setCommid(long commid) {
        this.commid = commid;
    }

    @Column(name = "itemid")
    @Id
    public int getItemid() {
        return itemid;
    }

    public void setItemid(int itemid) {
        this.itemid = itemid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WoCommentitemEntityPK that = (WoCommentitemEntityPK) o;

        if (commid != that.commid) return false;
        if (itemid != that.itemid) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (commid ^ (commid >>> 32));
        result = 31 * result + itemid;
        return result;
    }
}
